<template>
    <KeepAlive>
        <waterfallMode v-if="mode == 'waterfall'" />
        <listMode v-else />
    </KeepAlive>
</template>
    
<script setup lang='ts'>
import waterfallMode from './mode/waterfallMode.vue'
import listMode from './mode/listMode.vue'
const $props = withDefaults(
    defineProps<{
        data: any[],
        itemAttr?: any,
        mode?: 'info' | 'waterfall'
    }>(),
    {
        data: () => [],
        mode: 'waterfall'
    }
)
provide('goods', computed(() => $props.data))
</script>
    
<style></style>